class Solution
{
public:
    vector<int> rowAndMaximumOnes(vector<vector<int>> &mat)
    {
        int maxOneCount = 0;
        int maxOneRow = 0;
        for (int i = 0; i < mat.size(); ++i)
        {
            auto &row = mat[i];
            int rowOneCount = accumulate(row.begin(), row.end(), 0);
            if (rowOneCount > maxOneCount)
            {
                maxOneCount = rowOneCount;
                maxOneRow = i;
            }
        }
        return {maxOneRow, maxOneCount};
    }
};